var mapview = Domain(
  data("Map directions distance", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Virtual Windows",
    gist -> "Distance from user location to location",
    spec -> "Distance between two locations in meters represented by a long value.",
    owner -> "design",
    prio -> 9
  ), 
  data("Map pin colour", 
    gist -> "A company specific map pin color",
    spec -> "A struct containing 3  integers representing red, green and blue with values ranging between 0 and 255.  A fourth value representing the opacity is also included as a double value between 0 and 1. This color is company specific and is used for further branding of the application.",
    state -> specified,
    owner -> "design",
	text -> "Elicitation = Interview, Specification = Data Model",
	prio -> 4
  ), 
  data("POI popup view Icon", 
    gist -> "An icon placed on the far left in a POI popup view",
    spec -> "A icon with a size of 32x32 pixels for a retina display, otherwise 16x16 pixels. The icon is placed on the far left in a popup view",
    state -> specified,
    owner -> "design",
	text -> "Elicitation = Similar companies, Specification = Screenshots",
	prio -> 3
  ), 
  data("POI pin type", 
    gist -> "Specific pin type for POIs",
    spec -> "Represented as an integer which is used to distinguish the POI pin type.",
    state -> specified,
    owner -> "design",
	text -> "Elicitation = Document studies, Specification = Data Model",
	prio -> 3
  ), 
  data("User pin type", 
    gist -> "Specific pin type for the users location",
    spec -> "A constant integer of value 1 named kUserPinType.",
    state -> specified,
    owner -> "design",
	text -> "Elicitation = Document studies, Specification = Data Model",
	prio -> 6
  ), 
  feature("Cancelable POI fetch", 
    gist -> "It should be possible to cancel POI fetching",
    spec -> "The product shall provide a way for the user to abort a POI fetch while waiting for it to finish. This is done by simply swithching tab",
    state -> specified,
    owner -> "design",
	text -> "Elicitation = Task demonstration, Specification = Feature requirements",
	prio -> 8
  ), 
  feature("Error margin radius", 
    gist -> "Shows the error margin",
    spec -> "The  GPS error margin, shown as a circle.",
    state -> specified,
    owner -> "product",
	text -> "Elicitation = Focus group, Specification = Task Description",
	prio -> 6
  ), 
  function("Fetch POIs", 
    gist -> "Fetches nearby points of interest from server.",
    spec -> "Sends a request to the server asking for the POIs and then converts the JSON encoded response to POIs.",
    state -> specified,
	owner -> "product",
	text -> "Elicitation = Negotiation, Specification = Context Diagram",
	prio -> 7
  ), 
  feature("From specified location", 
    why -> "Functionality covered by other requirements",
    state -> dropped,
    gist -> "Gives directions to a Point Of Interest from a specified location, perhaps different from the users current position.",
    spec -> "If the user has specified a location on the map, then directions to a Point Of Interest should optionally originate from this specified location instead of the user\'s current location.",
    owner -> "design",
    text -> "Elicitation = Brainstorming, Specification = Task Description",
    prio -> 0
  ), 
  feature("Hybrid map view", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Task Description",
    gist -> "Map can be displayed as a hybrid view",
    spec -> "The map view should be able to display a map combining the normal map view and satellite view.",
    owner -> "domain",
    prio -> 6
  ), 
  feature("Hybrid map view") has (quality("Map correct overlap")), 
  feature("Map arrow", 
    gist -> "Arrow pointing to locations rendered on top of the map view",
    spec -> "There should be functionality to display arrows that point to POIs outside of the current displayed area of the map",
    state -> specified,
    owner -> "product",
	text -> "Elicitation = Brainstorming, Specification = Feature requirements",
	prio -> 8
  ), 
  feature("Map arrow") has (feature("Transform to a map pin"),quality("Map arrow size"),function("Map arrow shows distance")), 
  feature("Map compass", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Screenshots",
    gist -> "A compass showing directions",
    spec -> "The product shall provide a compass showing the users direction in relation to the direction of the earth\'s poles.",
    owner -> "product",
    prio -> 9
  ), 
  feature("Map pin", 
    gist -> "A pin rendered on the map that marks a location.",
    spec -> "Map pins are used to mark the locations of Points Of Interest on the map. There should be functionality to render map pins on top of the rendered map.",
    state -> specified,
    owner -> "domain",
	text -> "Elicitation = Document studies, Specification = Screenshots",
	prio -> 6
  ), 
  feature("Map pin") has (feature("POI popup"),data("POI pin type"),data("Map pin colour"),function("POI popup"),feature("Tapable map pin")), 
  feature("Map support", 
    state -> specified,
    text -> "Elicitation = Document studies, Specification = Feature requierments",
    gist -> "Map features",
    spec -> "This is the main feature of the map part of the application.",
    owner -> "domain",
    prio -> 6
  ), 
  feature("Map support") enables (function("Show map"),feature("Map view")),
  feature("Map support") has (function("Fetch POIs"),feature("Cancelable POI fetch")), 
  feature("Map view directions", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Feature requirements",
    gist -> "Gives the user directions from user\'s location to the specified POI",
    spec -> "The product shall provide directions for the user from their current location to a user specified POI.",
    owner -> "product",
    prio -> 7
  ), 
  feature("Map view directions") has (data("Map directions distance")), 
  feature("Map view", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Context Diagram",
    gist -> "The map view retrieved from Google Maps",
    spec -> "The map view should be retrieved by the application from Google Maps through the Google API.",
    owner -> "domain",
    prio -> 7
  ), 
  feature("Map view") enables (feature("Zoomable map view"),feature("Sattelite map view"),feature("Map pin"),feature("Map view directions"),feature("User location"),feature("Hybrid map view"),feature("Map arrow"),feature("Map compass"),feature("Panable map view"),feature("Regular map view")),
  feature("Map view") has (quality("Maximum pins"), quality("Maximum arrows")),
  feature("POI changeable icon", 
    gist -> "Pins should have customizable icon",
    state -> dropped,
    text -> "Elicitation = Brainstorming",
    prio -> 0
  ), 
  feature("POI popup", 
    gist -> "Shows information about a selected POI",
    spec -> "When a user selects a POI a small popup with information about the locations name, address, rating, and distance. It also shows a customisable icon and a button wich loads an info view cointaing POI info. ",
    state -> specified,
	owner -> "product",
	text -> "Elicitation = Negotiation, Specification = Screenshot",
	prio -> 5
  ), 
  feature("Panable map view", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Feature requierments",
    gist -> "The map view should be panable",
    spec -> "The user can pan the map by using a 1 finger swipe gesture.",
    owner -> "product",
    prio -> 8
  ), 
  feature("Pin types", 
    gist -> "There should exist more than one type of pins.",
    spec -> "There should exist support for the system to allow the existence of more than one kind of pin type.",
    state -> specified,
    owner -> "domain",
	text -> "Elicitation = Focus group, Specification = Data model",
	prio -> 6
  ), 
  feature("Pin types") has (data("User pin type"),data("POI pin type")), 
  feature("Regular map view", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Feature requirements",
    gist -> "Support for a regular map view",
    spec -> "The system shall support viewing of a regular map view provided by google maps.",
    owner -> "domain",
	prio -> 9
  ), 
  feature("Satellite map view", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Task Description",
    gist -> "Map can be displayed as a satellite view",
    spec -> "The user should be able to use the map view to see the map as the satellite view map supplied by the Google API. ",
    owner -> "domain",
	prio -> 6
  ), 
  feature("Scaling map arrow", 
    state -> specified,
    gist -> "Arrows should scale depending on distance.",
    spec -> "The arrows that point towards the POI should change their size depending on the distance between the user and the POI. If the distance grow, the arrow should also grow in size. If the distance get smaller between the user and the POI, the arrows should get smaller.",
    owner -> "design",
	text -> "Elicitation = Focus group, Specification = Virtual Window",
	prio -> 4
  ), 
  feature("Specifiable location", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Feature requirements",
    gist -> "The user location can be specified",
    spec -> "A new location of the user can be specified by the user through the graphical user interface.",
    owner -> "product",
    prio -> 9
  ), 
  feature("Tapable map pin", 
    gist -> "Pins are tapable",
    spec -> "Pins seen on the map view can be tapped by the user so the user can access more information of said pin.",
    state -> specified,
    owner -> "product",
	text -> "Elicitation = Brainstorming, Specification = Task Description",
	prio -> 9
  ), 
  feature("Transform to a map pin", 
    gist -> "Transforms arrow into a map pin",
    spec -> "The system shall remove direction arrows and replace them with pins when the POI enters the map view port.",
    state -> specified,
    owner -> "design",
	text -> "Elicitation = Brainstorming, Specification = Feature requirements",
	prio -> 4
  ), 
  feature("User location", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Screenshots",
    gist -> "Show the location of the user",
    spec -> "The system shall show the users location on the map.",
    owner -> "domain",
    prio -> 9
  ), 
  feature("User location") has (data("User pin type"),feature("Speciable location"),feature("Error margin radius")), 
  feature("Viewability toggle", 
    gist -> "Visibility of radius can be toggled",
    spec -> "The system shall provide an option to toggle if the radius used while filtering should be visible or not.",
    state -> dropped,
    why -> "Replaced by distance filter.",
    text -> "Elicitation = Interview, Specification = Feature requirements",
	prio -> 0
  ), 
  feature("Zoomable map view", 
    why -> "",
    state -> "specified",
    gist -> "The user should be able to zoom in and out in the map view",
    spec -> "The user should be able to zoom in and out using a pinch gesture with two fingers",
    owner -> "domain",
    text -> "Elicitation = Similar Companies, Specification = Context Diagram",
	prio -> 7
  ), 
  function("POI popup") has (data("POI popup view icon")), 
  function("Show POIs", 
    state -> "specified",
    gist -> "Shows POIs according to the user defined filter",
    spec -> "Shows all the POIs that are allowed to be seen by the user specified filter",
    owner -> "product",
    text -> "Elicitation = Similar Companies, Specification = Screenshots",
	prio -> 9
  ), 
  function("Show map", 
    state -> specified,
    gist -> "Shows a map",
    spec -> "Shows, by default, a regular map view. This map view contains POIs matching the userdefined filters. The map view also shows distance arrows and the users current location along with it\'s error margin.",
    owner -> "domain",
    text -> "Elicitation = Document Studies, Specification = Feature requirements",
    prio -> 9
  ), 
  function("Show map") enables (function("Show POIs")), 
  function("Map arrow shows distance", 
    state -> specified,
    gist -> "The arrows should show the distance from the user to the location",
    spec -> "At each of the arrows that point towards a POI a distance from the user to said POI is written when tapped.",
    owner -> "product",
	text -> "Elicitation = Interview, Specification = Screenshots",
	prio -> 3
  ), 
  quality("Map arrow size", 
    why -> "Limiting the size arrows is needed to prevent the screen to be cluttered.",
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Screenshots",
    gist -> "Map arrows should not be too large",
    spec -> "The maximum size of a map arrows shall be limited to 48x48 pixels",
    owner -> "design",
	prio -> 3
  ), 
  quality("Map correct overlap", 
    why -> "The hybrid view will combine two map views and to reduce confusion they should be correctly placed upon each other.",
    state -> specified,
    gist -> "A hybrid map should be correctly displayed",
    spec -> "The roads on the hybrid view should be placed correctly on top of the satellite image of them.",
    owner -> "domain",
	text -> "Elicitation = Brainstorming, Specification = Task Description",
	prio -> 5
  ), 
  quality("Maximum arrows", 
    why -> "Avoiding a cluttered screen is important for the user to apprehend the information available in the application.",
    state -> specified,
    gist -> "Limit how many arrows are shown",
    spec -> "A maximum of 5 arrows may be shown at any given time.",
    owner -> "design",
	text -> "Elicitation = Brainstorming, Specification = Screenshots",
	prio -> 3
  ), 
  quality("Maximum pins", 
    why -> "Avoiding a cluttered screen is important for the user to apprehend the information available in the application.",
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Screenshots",
    gist -> "Limit how many pins that are shown",
    spec -> "A maximum of 50 pins may be shown at any given time.",
    owner -> "design",
    prio -> 2
  ), 
  quality("Radius visibility", 
    gist -> "The radius should be visible to most users.",
    spec -> "When the radius is shown it should be visible to at least 78\\% of all users.",
    state -> dropped,
    why -> "Replaced by distance filter.",
    text -> "Elicitation = Brainstorming, Specification = Feature requirements",
	prio -> 0
  )
)
